<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Document</title>
  <script src="../js/vue.js"></script>
</head>

<body>
  <div id="app">
    <ul>
      <!--本例中: 因为要反复生成多个li，所以v-for要写在li上，而不是li的父元素ul上-->
      <li v-for="(item,i) of cellphone" :key="i">
        手机品牌{{i+1}}: {{item}}
      </li>
    </ul>
  </div>
  <script>
    Vue.createApp({      
      data(){
				return {
					cellphone: ["华为", "苹果", "小米", "三星"],
				}
      },
    }).mount("#app");
  </script>
</body>

</html>